
#pragma once

#include <string>

static const char *CARD_PACK_TYPE_NAMES[] = {
		"today",
		"week",
		"bronze",
		"silver",
		"gold",
		"weapon",
		"armor",
		"shield",
		"special",
};

enum class CardPackType {
	today,
	week,
	bronze,
	silver,
	gold,
	weapon,
	armor,
	shield,
	special,
	count,
};

struct CardPackInfo {
	CardPackType type;
	std::string title;
	int price;
	int legendary;
	int rare;
	int uncommon;
	int common;

	static CardPackType parseType(const char* s) {
		CardPackType ret = CardPackType::bronze;

		for(int i = 0; i < (int)CardPackType::count ; i++) {
			if(strcmp(CARD_PACK_TYPE_NAMES[i], s) == 0) {
				ret = static_cast<CardPackType>(i);
				break;
			}
		}

		return ret;
	}
};